<?php
	require_once("UserVO.php");
	
	/**
	 * Value object representation of a forum post comment.
	 */
	class ForumCommentVO {
		
		var $_explicitType="vo.ForumCommentVO";
		
		/** The unique ID of the forum post comment. */
		var $forumCommentUID;
		
		/** The unique ID of the forum post the comment was made on. */
		var $forumPostUID;
		
		/** The details of the user who made the comment. */
		var $user;
		
		/** The message body of the comment. */
		var $message;
		
		/** The date the comment was made. */
		var $dateCreated;
		
		/** Creates a new instance of a ForumCommentVO. */
		public function ForumCommentVO() {}
		
		/**
		 * Maps a database record to a ForumCommentVO.
		 * @param $row The record to map to a ForumCommentVO.
		 * @return A new mapped instance of a ForumCommentVO.
		 */
		public static function mapObject($row) {
			
			$vo = new ForumCommentVO();
			
			$vo->forumCommentUID 	= $row["forumCommentUID"];
			$vo->forumPostUID 		= $row["forumPostUID"];
			$vo->user 				= UserVO::mapObject($row);
			$vo->message 			= $row["message"];
			$vo->dateCreated 		= $row["dateCreated"];
			
			return $vo;
		}
	}
?>